﻿using Core.API.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Api.Providers
{
    public class ResponseApI
    {
        #region 成功
        /// <summary>
        /// 成功
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel Success()
        {
            return new RespBaseModel(true, 0, "成功");
        }
        #endregion

        #region Token错误
        /// <summary>
        /// 成功
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel TokenError()
        {
            return new RespBaseModel(false, 400, "Token错误");
        }
        #endregion

        #region 数据格式错误
        /// <summary>
        /// 数据格式错误
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel DataFormatterError()
        {
            return new RespBaseModel(false, 100, "数据格式错误");
        }
        #endregion

        #region 未知错误
        /// <summary>
        /// 未知错误
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel UnknowError()
        {
            return new RespBaseModel(false, 500, "位置异常");
        }
        #endregion

        #region 帐号密码错误
        /// <summary>
        /// 帐号密码错误
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel PwdError()
        {
            return new RespBaseModel(false, 101, "帐号或密码错误");
        }
        #endregion

        #region 帐号已注册
        /// <summary>
        /// 帐号已注册
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel HasAccount()
        {
            return new RespBaseModel(false, 102, "帐号已注册");
        }
        #endregion

        #region 无法修改帐号
        /// <summary>
        /// 无法修改帐号
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel CantEditAccount()
        {
            return new RespBaseModel(false, 103, "已有帐号，无法修改");
        }
        #endregion

        #region 验证码错误
        /// <summary>
        /// 验证码错误
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel CodeError()
        {
            return new RespBaseModel(false, 201, "验证码错误");
        }
        #endregion

        #region 两次输入密码不一致
        /// <summary>
        /// 两次输入密码不一致
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel PwdTheSame()
        {
            return new RespBaseModel(false, 302, "新密码不能和旧密码一样");
        }
        #endregion

        #region 旧密码错误
        /// <summary>
        /// 旧密码错误
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel OldPwdError()
        {
            return new RespBaseModel(false, 301, "旧密码错误");
        }
        #endregion

        #region 未绑定
        /// <summary>
        /// 未绑定
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel NotRelation()
        {
            return new RespBaseModel(false, 250, "未绑定改证件");
        }
        #endregion

        #region 证件离线
        /// <summary>
        /// 证件离线
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel CardOffline()
        {
            return new RespBaseModel(false, 300, "证件离线");
        }
        #endregion

        #region 未注册
        /// <summary>
        /// 未注册
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel NotReg()
        {
            return new RespBaseModel(false, 301, "未注册");
        }
        #endregion

        #region 暂不支持该区域查话费
        /// <summary>
        /// 暂不支持该区域查话费
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel NotSearchCost()
        {
            return new RespBaseModel(false, 403, "暂不支持该区域查话费");
        }
        #endregion

        #region 未设置号码无法查询
        /// <summary>
        /// 未设置号码无法查询
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel NoPhone()
        {
            return new RespBaseModel(false, 404, "未设置号码无法查询");
        }
        #endregion

        #region 无法换卡
        /// <summary>
        /// 无法换卡
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel NotChangeCard()
        {
            return new RespBaseModel(false, 401, "新imei已被绑定");
        }
        #endregion

        #region 区域不存在
        /// <summary>
        /// 区域不存在
        /// </summary>
        /// <returns></returns>
        public static RespBaseModel NoAreaID()
        {
            return new RespBaseModel(false, 410, "区域不存在");
        }
        #endregion
    }
}